1. Field of the Invention
The embodiments disclosed herein relate to a motor control device and a motor control method.
2. Description of the Related Art
Japanese Unexamined Patent Application Publication No. 2012-191675 discloses a configuration of switching between velocity control for a spindle during a normal operation and position control for certain-position stop control for the spindle during exchange of a tool, in a motor control device that controls driving of a spindle motor of a machine tool, for example. During velocity control, velocity feedback control is performed. During position control, torque feedforward control is performed as well as velocity feedback control and position feedback control.
Specifically, the moment of inertia of a rotor of the motor and a control target is identified during certain-position stop control, and an acceleration command (deceleration command) for causing abrupt stop at a maximum torque with respect to the moment of inertia is calculated. With the product of the acceleration command and the moment of inertia, a torque feedforward command is calculated, the torque feedforward command is added to a torque command in velocity feedback control, and a resulting command is input to the motor. A position command for position feedback control is calculated by performing second-order differentiation on the acceleration command. Accordingly, positioning control for a target stop position, at which a tool can be appropriately exchanged, can be performed in short time while abrupt stop at a maximum torque is performed during certain-position stop control.